Simplify position-symbol
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 13 Feb 2024 17:54:51 +0000 (09:54 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 13 Feb 2024 19:20:33 +0000 (11:20 -0800)
* src/data.c (Fposition_symbol): Simplify by calling Fbare_symbol
rather than open-coding it.

src/data.c

index 530bb774171f88cb7c7ac47745ca9f05b29e40a7..f2f35fb355aa188db6865a84f10a2a8122a6a7f6 100644 (file)
@@ -821,16 +821,9 @@ POS, the position, is either a fixnum or a symbol with position from which
 the position will be taken.  */)
      (register Lisp_Object sym, register Lisp_Object pos)
 {
-  Lisp_Object bare;
+  Lisp_Object bare = Fbare_symbol (sym);
   Lisp_Object position;
 
-  if (BARE_SYMBOL_P (sym))
-    bare = sym;
-  else if (SYMBOL_WITH_POS_P (sym))
-    bare = XSYMBOL_WITH_POS_SYM (sym);
-  else
-    wrong_type_argument (Qsymbolp, sym);
-
   if (FIXNUMP (pos))
     position = pos;
   else if (SYMBOL_WITH_POS_P (pos))